/**
 * 
 */
package t4j.innerclasses;

/**
 * @author sz
 *
 * create time：2012-9-13
 */
public class Parcel2 {
	//1
	class Contents{
		private int i = 11;
		
		public int value(){return i;}
	}
	//2
	class Destination{
		private String label;
		
		Destination(String s){
			label = s;
		}
		
		String readLabel(){return label;}
	}
	
	public Destination to(String s){
		return new Destination(s);
	}
	
	public Contents contents(){
		return new Contents();
	}
	
	public void ship(String dest){
		Contents c = contents();
		
		Destination d = to(dest);
		
		System.out.println(d.readLabel());
	}
	
	public static void main(String[] args) {
		Parcel2 p = new Parcel2();
		
		p.ship("Tasmainsa");
		
		Parcel2.Contents c = p.contents();
		
		System.out.println(c.value());
		
		Parcel2.Destination d = p.to("abc");
		
		System.out.println(d.readLabel());
		
		
		//Parcel2.Contents e = new Parcel2.Contents();
	}
	
	
}
